import {Card,Space,Alert,Typography} from 'antd'

import {Link} from 'react-router-dom';

import inImg from '@/assets/img/in.png';
import outImg from '@/assets/img/out.png';
import storeImg from '@/assets/img/store.png';

import styles from './index.module.scss';
import pub from '@/units/pub';

const {Meta} = Card;
const {Title} = Typography;

const Home = () => {
    return <>
        <Title level={2}>{pub.getData('username')}，{(new Date().getHours() < 12)? '上午' : '下午' }好！</Title>
        <Space>
            <Link to="/management/lib/goods">
                <Card
                    hoverable
                    style={{ width: 240 }}
                    cover={<img alt="仓库管理" src={storeImg}  style={{backgroundColor:'lightblue'}}/>}
                >
                    <Meta title="库存管理" description="查看库存表" />
                </Card>
            </Link>
            <Link to="/management/lib/in_storage/add">
                <Card
                    hoverable
                    style={{ width: 240 }}
                    cover={<img alt="进货" src={inImg}  style={{backgroundColor:'lightyellow'}}/>}
                >
                    <Meta title="进货" description="新增入库单" />
                </Card>
            </Link>
            <Link to="/management/lib/out_storage/add">
                <Card
                    hoverable
                    style={{ width: 240 }}
                    cover={<img alt="领用" src={outImg}  style={{backgroundColor:'lightgreen'}}/>}
                >
                    <Meta title="领用" description="新增出库单" />
                </Card>
            </Link>
        </Space>
    </>
}
export default Home;